Err.Number

Note: This statement is named Error Number in the Add Statement dialog box.

Returns the error number for the last error that occurred, as defined in the Err.Raise statement. Use to generate output that is helpful when debugging scripts.

Syntax

Number()

Supported objects

Err

Return value

Value Description
1 Object action error. Indicates a control was not found or interacted with.
2 Argument error. Indicates an invalid, missing, or unexpected argument.
3 Parser error. Indicates an invalid statement.
4 Function error. Indicates a function or statement returned an error.

Example

'Captures errors from regression test suite

Try

'Runs regression test

Script.CallScript("RegressionSuite")

Catch

'Prints error information for debugging purposes

PrintLn ("Script with error: " + Err.ScriptName())

PrintLn ("Error #: " + Err.Number())

PrintLn ("Error source: " + Err.Source())

PrintLn ("Error description: " + Err.Description())

PrintLn ("Script line number: " + Err.LineNumber())

PrintLn ("Script line text: " + Err.LineText())

PrintLn ("Call stack: " + Err.CallStack())

End Try